<div class="panel panel-default">
	<div class=" panel-heading clearfix">
		关于"<%= params[:q]%>"的搜索结果,共<%= @result.results.total%> 条
	</div>
	<div class="panel-body">
		<table>
		<% @result.records.each_with_hit do |item,hit|%>
			<%if item.class.name.downcase.eql?("topic")%>
					<tr>
						<td style="padding-bottom: 20px">
							<p><%= link_to item.title,topic_path(item.id)%></p>
							<%= hit.body.try(:first)%>
						</td>
					</tr>
				<%end%>
				<%end%>

			</table>
	</div>
	<div class="panel-footer">
		<%=will_paginate @result %>
	</div>
</div>